/* 
unizp the data that is available upon request from
Michael Cysouw <cysouw@uni-marburg.de>
*/

quietly capture unzipfile paralleltext-master.zip, replace
local dir `c(pwd)'

/* copy relevant data */
!xcopy "`dir'\\paralleltext-master\bibles\corpus" "`dir'\\corpus" /I

/* erase rest */
!rd /s /q "`dir'\\paralleltext-master"

/* 
read in the master data
*/

import delimited master.csv, delimiter(tab) bindquote(nobind) varnames(1) stripquote(yes) case(preserve) encoding(UTF-8) clear 

save data_bible_final, replace

/* 
correct for one typo in the paralleltext data
*/

copy "`dir'\\corpus\agw-x bible.txt" "`dir'\corpus\agw-x-bible.txt", replace

/*
copy the old English file that was provided by
Katharian Ehret <katharina.ehret@hpsl.uni-freiburg.de>
and prepared by me.
*/

copy "`dir'\\ang-x-bible.txt" "`dir'\corpus\ang-x-bible.txt", replace


exit